FISS
class fisspy.read.read_factory.FISS(filename, x1=0, x2=None, y1=0, y2=None, ncoeff=False, smoothingMethod=None, wvCalibMethod='simple', **kwargs)
Description: Read FISS dataParameters
- filename (str) - File name of the proc or comp data file.
- x1 (int, optional) - A left limit index of the frame along the scan direction.
- x2 (int, optional) - A right limit index of the frame along the scan direction. If None, read all data from x1 to the end of the scan direction.
- y1 (int, optional) - A left limit index of the frame along the slit direction.
- y2 (int, optional) - A right limit index of the frame along the slit direction. If None, read all data from x1 to the end of the slit direction.
- ncoeff (int, optional) - The number of coefficients(eigen vectors) to be used for the construction of frame in a pca file.
- smoothingMethod (str, optional) - If it is not given, do not apply the noise filter. If 'savgol', apply the Savitzky-Golay noise filter in the wavelength axis. If 'gauss', apply the Gaussian noise filter in the wavelength axis. Default is None.
- wvCalibMethod (str, optional) - Method to calibrate wavelength. 'simple': calibration with the information of the header. 'center': calibration with the center of the main line. 'photo': calibration with the photospheric line and the main line. Default is 'simple'.
- **kwargs - smoothing properties. Either scipy.signal.savgol_filter properties or scipy.ndimage.gaussian_filter1d.
Returns
- Read FISS object
Examples
Read FISS data
ViewAttributes Summary
Attributes | Description |
---|---|
data | Data array. |
header | FITS Header. |
wave | 1D Wavelength array. |
cwv | Central wavelength. |
refProfile | Spatially averaged reference profile. |
date | Observation date. |
nwv | Number of pixel in wavelength direction. |
ny | Number of pixel in slit direction. |
nx | Number of pixel in scan direction. |
ftype | File type of the input data frame. It should be either 'proc' or 'comp' |
filename | input file name. |
pfile | file for egienvector of the comp data. |
cam | Camera inform. Either 'A' or 'B'. |
band | Wavelength band. |
dx | Pixel scale for x-axis (scan direction). |
dy | Pixel scale for y-axis (slit direction). |
dwv | Pixel scale for λ-axis (wavelength direction). |
smoothing | Whether the profiles are smoothed or not. |
Methods Summary
Methods | Description |
---|---|
imshow(x=None, y=None, wv=None, scale='log', sigFactor=2, helpBox=True, **kwargs) | Draw the interactive images (raster, spectrogram and profile). |
vshow(x=None, y=None, **kw) | Draw line-of-sight Doppler map. |
reload(x1=0, x2=None, y1=0, y2=None, ncoeff=False, smoothingMethod=None, **kwargs) | Reload the FISS data. |
wvCalib(profile=None, method='photo') | Wavelength calibration |
corSLA(refProf=None, pure=None, eps=0.027, zeta=0.055) | Correction of spectral line profile(s) for stray light and far wing red-blue asymmetry. |
smoothingProf(method='savgol', **kwargs) | Smoothing spectral profiles. |
getRaster(wv, hw=0,05) | Get a raster image for a given wavelength. |
lambdameter(**kwargs) | Calculate the line-of-sight Doppler shift by using the lambda-meter (bisector) method. |
chRasterClim(cmin, cmax) | Change color limit for raster image. |
chSpectroClim(cmin, cmax) | Change color limit for Spectrograph image. |
chcmap(cmap) | Change color map. |
chRaster(wv) | Change raster image for a given wavelength. |
chSpect(x, y) | Change Spectrograph for a given position. |
chIclim(cmin, cmax) | Change the color limit of the intensity map on the vshow figure. |
chVclim(cmin, cmax) | Change the color limit of the velocity map on the vshow figure. |
Methods Documentation
imshow(x=None, y=None, wv=None, scale='log', sigFactor=2, helpBox=True, **kwargs)
Description: Draw the interactive images (raster, spectrogram and profile)Parameters
- x (float) - X position to draw a spectral profile. Default is image center.
- y (float) - Y position to draw a spectral profile. Default is image center.
- wv (float) - Wavelength position to draw a raster image. Default is central wavelength.
- scale (str) - Colorbar scale. Default is 'log'. Options: 'minMax', 'std', 'log'.
- sigFactor (float) - Factor of standard deviation of the color scale of 'std'.
- helpBox (bool) - Show helpbox for the interactive keys. Default is True.
- **kwargs: matplotlib.pyplot properties
Returns
- None - It draw the matplotlib figure.
Note: To use the function correctly, you should change the backend of the matplotlib from inline to any of interactive backend (see here). In IPython you can simply change the backend by using '%matplotlib' magic function.
vshow(x=None, y=None, **kw)
Description: Draw line-of-sight Doppler mapParameters
- x (float) - X position to draw a spectral profile. Default is image center.
- y (float) - Y position to draw a spectral profile. Default is image center.
- **kwargs: fisspy.analysis.lambameter properties
Returns
- None - It draw the matplotlib figure.
Note: To use the function correctly, you should change the backend of the matplotlib from inline to any of interactive backend (see here). In IPython you can simply change the backend by using '%matplotlib' magic function.
reload(x1=0, x2=None, y1=0, y2=None, ncoeff=False, smoothingMethod=None, **kwargs)
Description: Reload the FISS dataParameters
- x1 (int, optional) - A left limit index of the frame along the scan direction.
- x2 (int, optional) - A right limit index of the frame along the scan direction. If None, read all data from x1 to the end of the scan direction.
- y1 (int, optional) - A left limit index of the frame along the slit direction.
- y2 (int, optional) - A right limit index of the frame along the slit direction. If None, read all data from x1 to the end of the slit direction.
- ncoeff (int, optional) - The number of coefficients(eigen vectors) to be used for the construction of frame in a pca file.
- smoothingMethod (str, optional) - If it is not given, do not apply the noise filter. If 'savgol', apply the Savitzky-Golay noise filter in the wavelength axis. If 'gauss', apply the Gaussian noise filter in the wavelength axis. Default is None.
- wvCalibMethod (str, optional) - Method to calibrate wavelength. 'simple': calibration with the information of the header. 'center': calibration with the center of the main line. 'photo': calibration with the photospheric line and the main line. Default is 'simple'.
- **kwargs - smoothing properties. Either scipy.signal.savgol_filter properties or scipy.ndimage.gaussian_filter1d.
Returns
- None
wvCalib(profile=None, method='photo')
Description: Wavelength calibrationParameters
- profile (numpy.ndarray) - Reference spectral profile.
- method (str) - Method to calibrate wavelength. 'simple': calibration with the information of the header. 'center': calibration with the center of the main line. 'photo': calibration with the photospheric line and the main line. Default is 'simple'.
Returns
- wv (numpy.ndarray) - Wavelength.
corSLA(refProf=None, pure=None, eps=0.027, zeta=0.055)
Description: Correction of spectral line profile(s) for stray light and far wing red-blue asymmetryParameters
- refProf (numpy.ndarray, optional) - (Spatially averaged) Reference line profile. If None, make refProfile by spatially averaging the Data. Default is None.
- pure (numpy.ndarry, optional) - True if not blended. Please see fisspy.correction.get_inform.Pure
- eps (float, optional) - Fraction of spatial stray light. The default is 0.027
- eps (float, optional) - Fration of spectral stray light. The default is 0.055
Returns
- cdata (numpy.ndarray) - Stray light and asymmetry corrected data.
See Also
- Chae et al. (2013)
- CorStrayLight: correction for stray light.
- CorAsymmetry: correction for far wing red-blue asymmetry.
smoothingProf(method='savgol', **kwargs)
Description: Smoothing spectral profilesParameters
- method (str, optional) - If 'savgol', apply the Savitzky-Golay noise filter in the wavelength axis. If 'gauss', apply the Gaussian noise filter in the wavelength axis. Default is 'savgol'.
- **kwargs - scipy.signal.savgol_filter properties or scipy.ndimage.gaussian_filter1d properties.
Returns
- wv (numpy.ndarray) - Wavelength.
getRaster(wv, hw=0.05)
Description: Get a raster image for a given wavelengthParameters
- wv (float) - Referenced wavelength.
- hw (float) - A half-width of wavelength to be integrated. Default is 0.05
Returns
- rasterImage (numpy.ndarray) - Raster Image at given wavelength.
lambdameter(wv, hw=0.05)
Description: Calculate the line-of-sight Doppler shift by using the lambda-meter (bisector) methodParameters
- **kwargs - fisspy.analysis.lambdameter properties
Returns
- wc (numpy.ndarray) - n dimensional array of central wavelength values.
- intc (numpy.ndarray) - n dimensional array of intensies of the line segment.
chRasterClim(cmin, cmax)
Description: Change color limit for raster imageParameters
- cmin (float) - Minimum color limit.
- cmax (float) - Maximum color limit.
Returns
- None - Change image color limit.
chSpectroClim(cmin, cmax)
Description: Change color limit for Spectrograph imageParameters
- cmin (float) - Minimum color limit.
- cmax (float) - Maximum color limit.
Returns
- None - Change image color limit.
chcmap(cmap)
Description: Change color mapParameters
- cmap (matplotlib.pyplot.cmap) - Change color map
Returns
- None - Change color map.
chRaster(wv)
Description: Change raster image for a given wavelengthParameters
- wv (float) - Wavelength position to draw raster image
Returns
- None - Change raster image.
chSpect(x, y)
Description: Change Spectrograph for a given positionParameters
- x (float) - X position to draw a spectral profile.
- y (float) - Y position to draw a spectral profile.
Returns
- None - Change spectral profile.
chIclim(cmin, cmax)
Description: Change the color limit of the intensity map on the vshow figureParameters
- cmin (float) - Minimum color limit.
- cmax (float) - Maximum color limit.
Returns
- None - Change color limit of the intensity map.
chVclim(cmin, cmax)
Description: Change the color limit of the velocity map on the vshow figureParameters
- cmin (float) - Minimum color limit.
- cmax (float) - Maximum color limit.
Returns
- None - Change color limit of the velocity map.